#include<iostream>
#include<string> 
using namespace std;
int n;
string s;
int main()
{
	while (getline(cin, s)) {
		bool idx = 0;
		string s1, s2;
		for (int i = 0; i < s.size(); i++) {
			//cout<<"s[i]"<<s[i]<<endl;
			if (s[i] != ' ') {
				s1 += s[i];
			}
			else {
				break;
			}
		}
		for (int i = s1.size() + 1; i < s.size(); i++) {
			s2 += s[i];
		}
		int a = 0, b = 0;
		bool flag1 = 0, flag2 = 0;
		for (int i = 0; i < s1.size(); i++) {
			if (s1[i] == '-') {
				flag1 = 1;
				continue;
			}
			if (s1[i] == ',') {
				continue;
			}
			//cout<<"i=="<<i<<" s1[i]=="<<s1[i]<<endl;
			a = a * 10 + s1[i] - '0';
		}
		for (int i = 0; i < s2.size(); i++) {
			if (s2[i] == '-') {
				flag2 = 1;
				continue;
			}
			if (s2[i] == ',')continue;
			b = b * 10 + s2[i] - '0';
		}
		if (flag1 + flag2 == 1) {
			if (flag1 == 1) {
				cout << b - a << endl;
			}
			else {
				cout << a - b << endl;
			}
		}
		else if (flag1 + flag2 == 0) {
			cout << a + b << endl;
		}
		else {
			cout << -(a + b) << endl;
		}
	}
	return 0;
}